<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>AngularJS路由</title>
		<script type="text/javascript" src="../js/angular.min.js" ></script>
		<script type="text/javascript" src="../js/angular-route.min.js" ></script>
	</head>
	<body ng-app="myapp">
		<div>
			<h1>Head</h1>
			<a href="#/JavaEE">JavaEE</a>
			<a href="#/IOS">IOS</a>
			<a href="#/Android">Android</a>
		</div>
		<div ng-view></div>
		<div>
			<h1>Foot</h1>
		</div>
	</body>
	<script type="text/javascript" >
		var myapp = angular.module("myapp",['ngRoute']);
		myapp.config([
			"$routeProvider",function($routeProvider){
				$routeProvider.when("/JavaEE",{
					templateUrl:'4_1.html'
				}).when("/IOS",{
					templateUrl:'4_2.html'
				}).when("/Android",{
					templateUrl:'4_3.html'
				}).otherwise({
					redirectTo:'/JavaEE'
				});
			}
		]);
		
	</script>
</html>
